<template>
	<view class="music-head" :style='{color:color}'>
		<view class="music-head-icon" v-if='icon' :class="{'muisc-head-iconblack':iconblack}">
			<text class="iconfont icon-youjiantou" @tap="handleToBack"></text> | 
			<text class="iconfont icon-shouye" @tap="handleToIndex"></text>
		</view>
		{{title}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props:{
			title:{
				type: String,
				require: true
			},
			icon:{
				type:Boolean,
				required:true
			},
			color:{
				type:String,
				default:'#000'
			},
			iconblack:{
				type:Boolean
			}
		},
		methods: {
			handleToBack() {
				this.$router.back()
			},
			handleToIndex() {
				
			}
		}
	}
</script>

<style scoped>
	.music-head{
		width:100%;
		height: 75px;
		font-size: 16px;
		line-height: 80px;
		text-align: center;
		color: #000;
		position: relative;
	}
	.music-head-icon{
		position: absolute;
		left:8px;
		top:26px;
		width: 90px;
		height: 30px;
		background-color: rgba(0,0,0,.4);
		color:#fff;
		line-height: 31px;
		border-radius: 15px;
		display: flex;
		justify-content: space-evenly;
	}
	.muisc-head-iconblack{
		color:#000;border:1px solid #eaeaea;
	}
</style>
